﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" Buffer="true" AutoEventWireup="true" CodeBehind="Selecionar_Produtos.aspx.cs" Inherits="SisEagle.View.Web.Pedidos.Selecionar_Produtos" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
 <script src="../Scripts/jquery-1.7.2.min.js" type="text/javascript"> </script>
    <script src="../Scripts/jquery.toastmessage.js" type="text/javascript"> </script>
    <script src="../Scripts/Notificacao.js" type="text/javascript"> </script>
    <link href="../Style/main/resources/css/jquery.toastmessage.css" rel="stylesheet"
        type="text/css" />    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="conteudo_interno">
        <div class="titulos_modulosCadastro">
            Seleção de Produtos
        </div>
        <asp:Panel ID="PanelPedidos" GroupingText="Dados" runat="server">
            <table style="width: 100%;">
                <tr>
                    <td style="width: 152px;" class="tdPaisCidadeUF">
                        Codigo Carrinho de Compras.:
                    </td>
                    <td style="width: 221px;">
                        <asp:Label ID="lblCodCarrinhoCompras" runat="server"></asp:Label>
                        &nbsp;</td>
                    <td style="width: 96px">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="width: 152px" class="tdPaisCidadeUF">
                        Cliente.:
                        <asp:Label ID="lblCodFuncionario" runat="server" Visible="False"></asp:Label>
                    </td>
                    <td colspan="3">
                        
                       
                        
                        <asp:Label ID="lblNomeCliente" runat="server" Font-Bold="False" 
                            Font-Italic="False"></asp:Label>
                        
                       
                        
                    </td>
                </tr>
                <tr>
                    <td class="tdPaisCidadeUF" style="width: 152px">
                        Funcionario.:
                    </td>
                    <td colspan="3">
                        <asp:Label ID="lblNomeFuncionario" runat="server" Font-Bold="False"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="tdPaisCidadeUF" style="width: 152px">
                        &nbsp;</td>
                    <td colspan="3">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td align="center" colspan="4">
                        <asp:Image ID="Image1" runat="server" 
                            ImageUrl="~/imagens/icone_compras_fundo.jpg" />
                        <br />
                        <asp:LinkButton ID="lkCatalogo" runat="server" Font-Bold="True" 
                            Font-Size="Large" onclick="lkCatalogo_Click">Abrir Catálogo de Produtos</asp:LinkButton>
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="4">
    
         <div class="grid_generico">
            <asp:UpdatePanel ID="UpdateGridProdutos" runat="server">
                
                <ContentTemplate>
                     <fieldset>
                    <legend>Produtos Selecionados para o Carrinho de Compras</legend>
                    <asp:GridView ID="gridProdutos" runat="server" Width="100%" 
                        BackColor="AliceBlue" AutoGenerateColumns="False" PageSize="2" AllowSorting="True"
                        BorderWidth="2px" CellPadding="2" CellSpacing="2" BorderColor="Silver" Font-Size="13px"
                        HeaderStyle-BackColor="BurlyWood" PagerSettings-Mode="NextPreviousFirstLast"
                        AlternatingRowStyle-BackColor="Silver" HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                        HeaderStyle-Width="170px" PagerSettings-Position="Bottom" PagerSettings-NextPageImageUrl="~/App_Themes/Default/imagens/grid/proxima_pagina.png"
                        PagerSettings-FirstPageImageUrl="~/App_Themes/Default/imagens/grid/primeira_pagina.png"
                        PagerSettings-LastPageImageUrl="~/App_Themes/Default/imagens/grid/ultima_pagina.png"
                        
                        
                        
                             PagerSettings-PreviousPageImageUrl="~/App_Themes/Default/imagens/grid/pagina_anterior.png">
                        <AlternatingRowStyle BackColor="Silver"></AlternatingRowStyle>
                        <Columns>
                            <asp:BoundField HeaderText="Codigo" DataField="CodProduto" 
                                ItemStyle-Width= "50px" >
                            <HeaderStyle Width="5%" />
                            <ItemStyle Width="50px" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="Nome" DataField="NomeProduto" 
                                ItemStyle-Width= "100px" >
                            <HeaderStyle Width="30%" />
                            <ItemStyle Width="100px" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="Quantidade" DataField="Quantidade" 
                                ItemStyle-Width= "100px" >
                            <HeaderStyle Width="5%" />
                            <ItemStyle Width="100px" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="Valor Unitario" DataField="ValorUnitarioVenda" 
                                ItemStyle-Width= "100px" >
                            <HeaderStyle Width="10%" />
                            <ItemStyle Width="100px" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="Valor Total">
                                <ItemTemplate>
                                    <asp:Label ID="lblValorTotal" runat="server"></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                                </EditItemTemplate>
                                <HeaderStyle Width="5%" />
                            </asp:TemplateField>
                            <asp:TemplateField AccessibleHeaderText="Clique Aqui para Editar" 
                                FooterText="Editar" HeaderText="Editar">
                                <ItemTemplate>
                                    <asp:HyperLink ID="HyperEditar" Text="Editar" runat="server" ImageUrl="~/imagens/sistema/botoes/btn_editar.png"
                                        NavigateUrl='<%# "Produto.aspx?cod=" + Eval("CodProduto")%>' />
                                </ItemTemplate>
                                <HeaderStyle Width="5%" />
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:TemplateField>
                            <asp:CommandField ButtonType="Image" 
                                DeleteImageUrl="~/imagens/sistema/botoes/icon_excluir.png" DeleteText="Remover" 
                                ShowDeleteButton="True">
                            <HeaderStyle Width="5%" />
                            <ItemStyle HorizontalAlign="Center" />
                            </asp:CommandField>
                        </Columns>
                        <HeaderStyle BackColor="BurlyWood" HorizontalAlign="Center" Width="170px" />
                        <PagerSettings FirstPageImageUrl="~/App_Themes/Default/imagens/grid/primeira_pagina.png" 
                            LastPageImageUrl="~/App_Themes/Default/imagens/grid/ultima_pagina.png" 
                            Mode="NextPreviousFirstLast" 
                            NextPageImageUrl="~/App_Themes/Default/imagens/grid/proxima_pagina.png" 
                            PreviousPageImageUrl="~/App_Themes/Default/imagens/grid/pagina_anterior.png" />
                    </asp:GridView>
                     </fieldset>
                </ContentTemplate>
            </asp:UpdatePanel>           
        </div>
   
    </div>
                    
                    </td>
                </tr>
                <tr>
                    <td align="right" colspan="4">
                        Total da Compra:
                        <asp:Label ID="lblTotalCarrinho" runat="server">0,00</asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right" colspan="4">
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="btnCancelar" runat="server" 
                            ImageUrl="~/imagens/botoes/btn_cancelar.png" onclick="btnCancelar_Click" 
                            onclientclick="confirm('Confirma Cancelar Carrinho de Compras?');" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="btnSalvar" runat="server" 
                            ImageUrl="~/imagens/botoes/btn_salvar.png" onclick="btnSalvar_Click" />
                    </td>
                </tr>
                <tr>
                    <td align="right" colspan="4">
                        &nbsp;</td>
                </tr>
            </table>
           
        </asp:Panel>
    </div>
</asp:Content>